# -*- coding: utf-8 -*-
from django.db.models import permalink, signals
from google.appengine.ext import db
from ragendja.dbutils import cleanup_relations

class Word(db.Model):
    """Basic user profile with personal details."""
    word = db.StringProperty(required=True)
    url = db.LinkProperty(required=True)
    user = db.UserProperty()
    def __unicode__(self):
        return '%s %s' % (self.word, self.url)

    @permalink
    def get_absolute_url(self):
        return ('mywords.views.show_word', (), {'key': self.key()})



